<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center"><div class="table-first-id">ID</div></th>
            <th class="text-center" width="12%">免费直播管理名称</th>
            <th class="text-center" width="15%">专业/科目</th>
            <th class="text-center" width="18%">开放时间</th>
            <th class="text-center" width="10%">播放状态</th>
            <th class="text-center" width="6%">预约数</th>
            <th class="text-center" width="6%">实到数</th>
            <th class="text-center" width="10%">创建人</th>
            <th class="text-center" width="8%">状态</th>
            <th class="text-center" width="10%">操作</th>
        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody>
            <tr class="jqgfirstrow" role="row">
                <td class="text-center"><div class="table-first-id">&nbsp;</div></td>
                <td class="text-center" width="12%">&nbsp;</td>
                <td class="text-center" width="15%">&nbsp;</td>
                <td class="text-center" width="18%">&nbsp;</td>
                <td class="text-center" width="10%">&nbsp;</td>
                <td class="text-center" width="6%">&nbsp;</td>
                <td class="text-center" width="6%">&nbsp;</td>
                <td class="text-center" width="10%">&nbsp;</td>
                <td class="text-center" width="8%">&nbsp;</td>
                <td class="text-center" width="10%">&nbsp;</td>
            </tr>
            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="10" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                    </div>
                </td>
            </tr>
            <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="courseOpen : ${dataMap['list']}" th:attrappend="id='course-open-'+${courseOpen['id']}">
                <td class="text-center">
                    <input type="checkbox" class="i-checks" name="courseOpenId" th:value="${courseOpen['id']}" />
                </td>
                <td class="text-center" th:attrappend="id='course-open-name-'+${courseOpen['id']}" th:text="${courseOpen['courseName']}"></td>
                <td class="text-center">
                    <th:block th:if="!${#lists.isEmpty(courseOpen['subjectList'])}">
                        <span class="pie" th:each="subject,subIndex : ${courseOpen['subjectList']}">
                            <th:block th:text="${subject['subjectName']}+'/'"></th:block>
                            <th:block th:if="!${#lists.isEmpty(subject['childSubjectList'])}" th:each="child,index : ${subject['childSubjectList']}">
                                <th:block th:if="${index.last} == false" th:text="${child['subjectName']}+'/'"></th:block>
                                <th:block th:if="${index.last} == true" th:text="${child['subjectName']}"></th:block>
                            </th:block>
                            <th:block th:if="${#lists.isEmpty(subject['childSubjectList'])}">全部科目</th:block>
                            <th:block th:if="${subIndex.last}==false" th:utext="'<br/>'"></th:block>
                        </span>
                    </th:block>
                    <th:block th:if="${#lists.isEmpty(courseOpen['subjectList'])}">
                        <span class="pie">—</span>
                    </th:block>
                </td>
                <td class="text-center">
                    <span th:text="${#strings.substring(courseOpen['openTime'],2,16)}"></span>
                    至
                    <span th:text="${#strings.substring(courseOpen['endTime'],2,16)}"></span>
                </td>
                <td class="text-center">
                    <span th:if="${courseOpen['playStatus']}==1" class="label label-info">进行中</span>
                    <span th:if="${courseOpen['playStatus']}==2" class="label label-danger">未开始</span>
                    <span th:if="${courseOpen['playStatus']}==3" class="label label-default">已结束</span>
                </td>
                <td class="text-center" th:text="${#strings.isEmpty(courseOpen['bespeakNum'])}?'0':${courseOpen['bespeakNum']}"></td>
                <td class="text-center" th:text="${#strings.isEmpty(courseOpen['attendNum'])}?'0':${courseOpen['attendNum']}"></td>
                <td class="text-center" th:text="!${#maps.isEmpty(courseOpen['createUser'])}?${courseOpen['createUser']['ralName']}:'—'"></td>

                <td class="text-center" th:attrappend="id='open-status-'+${courseOpen['id']}">
                    <span th:if="${courseOpen['status']}==1" class="label label-info">正常</span>
                    <span th:if="${courseOpen['status']}==2" class="label label-danger">冻结</span>
                </td>
                <td class="text-center">
                    <a href="javascript:void(0);" class="c-master fs14 ml5" th:attrappend="data-id=${courseOpen['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="查看">
                        <i class="fa fa-eye"></i>
                    </a>
                    <a th:href="@{/admin/course/open/initUpdate?id={id}(id=${courseOpen['id']})}" class="c-master fs14 ml5" th:attrappend="data-id=${courseOpen['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="修改">
                        <i class="fa fa-edit"></i>
                    </a>
                    <a  href="javascript:void(0);" class="c-master fs14 ml5" th:attrappend="data-id=${courseOpen['id']},data-type=${courseOpen['playType']},data-ptcode=${courseOpen['studentCode']},data-admincode=${courseOpen['adminCode']},data-teachercode=${courseOpen['teacherCode']},data-teachername=(${courseOpen['teacher']}!=null?${courseOpen['teacher']['teacherName']}:''),data-room=${courseOpen['roomId']},data-room=${courseOpen['roomId']}" data-toggle="tooltip" data-placement="bottom" data-original-title="开始直播">
                        <i class="fa fa-video-camera"></i>
                    </a>
                    <a th:if="${courseOpen['status']}==1" th:attrappend="id='status-action-'+${courseOpen['id']},data-id=${courseOpen['id']}" href="javascript:void(0);" courseOpenStatus class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="冻结">
                        <i class="fa fa-unlock-alt"></i>
                    </a>
                    <a th:if="${courseOpen['status']}==2" th:attrappend="id='status-action-'+${courseOpen['id']},data-id=${courseOpen['id']}" href="javascript:void(0);" courseOpenStatus class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="恢复">
                        <i class="fa fa-history"></i>
                    </a>
                    <a href="javascript:void(0);" th:attrappend="id='status-action-'+${courseOpen['id']},data-id=${courseOpen['id']}" class="c-master fs14 ml5" data-toggle="tooltip" data-placement="bottom" data-original-title="删除">
                        <i class="fa fa-trash-o"></i>
                    </a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>
</html>

